package com.course.domain.service;

import com.course.domain.model.Account;
import com.course.domain.model.Student;
import com.course.domain.model.Teacher;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * Created by Justin on 2017/5/12.
 */
public interface UserService {

    Student createStudent(String username, String password, Student student);

    Teacher createTeacher(String username, String password, Teacher teacher);

    Account updateAccount(Account account);

    Student updateStudent(Student student);

    Teacher updateTeacher(Teacher teacher);

    Student deleteStudent(Student student);

    Teacher deleteTeacher(Teacher teacher);

    Account loadAccount(int accountId);

    Student loadStudent(int studentId);

    Teacher loadTeacher(int teacherId);

    Account loadAccountByUsername(String username);

    Student loadStudentByUsername(String username);

    Teacher loadTeacherByUsername(String username);

    Student loadStudentByAccount(int accountId);

    Teacher loadTeacherByAccount(int accountId);

    List<Account> listAccount();

    List<Student> listStudent();

    List<Teacher> listTeacher();

    List<Account> findAccount(List<Integer> accountIds);

    List<Student> findStudent(List<Integer> studentIds);

    List<Teacher> findTeacher(List<Integer> teacherIds);

    Page<Account> pageAccount(Pageable pageable);

    Page<Student> pageStudent(Pageable pageable);

    Page<Teacher> pageTeacher(Pageable pageable);
}
